

<?php if ($this->_var['full_page']): ?>
<?php echo $this->fetch('pageheader.htm'); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'js/utils.js,listtable.js')); ?>


<form method="post" action="" name="listForm" onsubmit="return confirmSubmit(this)">
  
  <div class="list-div" id="listDiv">
<?php endif; ?>
<table cellpadding="3" cellspacing="1">
  <tr>
    <th>
      <input onclick='listTable.selectAll(this, "checkboxes")' type="checkbox" />
      <a href="javascript:listTable.sort('goods_id'); ">Proposal ID</a><?php echo $this->_var['sort_goods_id']; ?>
    </th>
	<th><a href="javascript:listTable.sort('goods_name'); ">User Name</a><?php echo $this->_var['sort_goods_name']; ?></th>
    <th><a href="javascript:listTable.sort('goods_name'); ">Proposal Subject</a><?php echo $this->_var['sort_goods_name']; ?></th>
	<th><a href="javascript:listTable.sort('goods_name'); ">Project Subject</a><?php echo $this->_var['sort_goods_name']; ?></th>
    <th><a href="javascript:listTable.sort('goods_sn'); ">Approx Price</a><?php echo $this->_var['sort_goods_sn']; ?></th>
    <th><a href="javascript:listTable.sort('is_on_sale'); ">Proposal Date</a><?php echo $this->_var['sort_is_on_sale']; ?></th>
    <th><a href="javascript:listTable.sort('is_best'); ">Awarded</a><?php echo $this->_var['sort_is_best']; ?></th>
    <th>Handler</th>
  <tr>
  <?php $_from = $this->_var['proposals_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'proposal');if (count($_from)):
    foreach ($_from AS $this->_var['proposal']):
?>
  <tr>
    <!--<td><input type="checkbox" name="checkboxes[]" value="<?php echo $this->_var['project']['goods_id']; ?>" /><?php echo $this->_var['project']['goods_id']; ?></td> -->
	<td><input type="checkbox" onclick="changeAction()" name="checkboxes[]" value="<?php echo $this->_var['project']['goods_id']; ?>"  /><?php echo $this->_var['proposal']['ppid']; ?></td>
    <!--<td class="first-cell" style="<?php if ($this->_var['project']['is_promote']): ?>color:red;<?php endif; ?>"><span onclick="listTable.edit(this, 'edit_goods_name', <?php echo $this->_var['project']['goods_id']; ?>)"><?php echo htmlspecialchars($this->_var['project']['goods_name']); ?></span></td> -->
	<td class="first-cell" style="<?php if ($this->_var['project']['is_promote']): ?>color:red;<?php endif; ?>"><span onclick="listTable.edit(this, 'edit_goods_name', <?php echo $this->_var['project']['goods_id']; ?>)"><?php echo htmlspecialchars($this->_var['proposal']['user_name']); ?></span></td>
	<td class="first-cell" style="<?php if ($this->_var['project']['is_promote']): ?>color:red;<?php endif; ?>"><a href="proposals.php?act=proposal_detail&pid=<?php echo $this->_var['proposal']['pid']; ?>&ppid=<?php echo $this->_var['proposal']['ppid']; ?>"><?php echo htmlspecialchars($this->_var['proposal']['proposalSubject']); ?></a></td>
	<td align="center"><span onclick="listTable.edit(this, 'edit_goods_sn', <?php echo $this->_var['project']['goods_id']; ?>)"><?php echo $this->_var['proposal']['subject']; ?></span></td>
    <td><span onclick="listTable.edit(this, 'edit_goods_sn', <?php echo $this->_var['project']['goods_id']; ?>)"><?php echo $this->_var['proposal']['approxPrice']; ?></span></td>
    <td align="right"><span onclick="listTable.edit(this, 'edit_goods_price', <?php echo $this->_var['project']['goods_id']; ?>)"><?php echo $this->_var['proposal']['proposaledDate']; ?>
    </span></td>
    <td align="right"><span onclick="listTable.edit(this, 'edit_goods_number', <?php echo $this->_var['project']['goods_id']; ?>)"><?php echo $this->_var['proposal']['awarded']; ?></span></td>
    <td align="center">
      <a href="proposals.php?act=proposal_detail&pid=<?php echo $this->_var['proposal']['pid']; ?>&ppid=<?php echo $this->_var['proposal']['ppid']; ?>" title="view"><img src="/admin/images/icon_view.gif" width="16" height="16" border="0" /></a>
      <a href="proposals.php?act=proposal_delete&ppid=<?php echo $this->_var['proposal']['ppid']; ?>" title="delete"><img src="/admin/images/icon_drop.gif" width="16" height="16" border="0" /></a>
    </td>
  </tr>
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</table>



<table id="page-table" cellspacing="0">
  <tr>
    <td align="right" nowrap="true">
    <?php echo $this->fetch('page.htm'); ?>
    </td>
  </tr>
</table>

<?php if ($this->_var['full_page']): ?>
</div>

<div>
  <input type="hidden" name="act" value="batch" />  	  
  <input type="submit" value="<?php echo $this->_var['lang']['button_submit']; ?>" id="btnSubmit" name="btnSubmit" class="button" disabled="true" />
</div>
</form>

<script type="text/javascript">
  

  function changeAction()
{
	
	var oCheckBox = document.getElementsByName('checkboxes[]');
	for(var i = 0; i < oCheckBox.length; i++)
	{
		if(oCheckBox[i].checked == true)
		{
			document.getElementById('btnSubmit').removeAttribute('disabled');
			return 0;
		}
	}
	document.getElementById('btnSubmit').setAttribute('disabled','disabled');
}

</script>
<?php echo $this->fetch('pagefooter.htm'); ?>
<?php endif; ?>